package com.lkx.farmershop.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (PrivateChat)实体类
 *
 * @author makejava
 * @since 2025-02-23 22:37:48
 */
@Setter
@Getter
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PrivateChat implements Serializable {
    private static final long serialVersionUID = -16784908365990500L;
/**
     * 主键
     */
@TableId
    private Long id;
/**
     * 用户id
     */
    private Long userId;
/**
     * 聊天对象id
     */
    private Long partnerId;
/**
     * 信息内容
     */
    private String content;
/**
     * 发送时间
     */
    private LocalDateTime sendTime;

    public PrivateChat(Long userId, Long partnerId, String content, LocalDateTime sendTime) {
        this.userId = userId;
        this.partnerId = partnerId;
        this.content = content;
        this.sendTime = sendTime;
    }
}

